<!-- 处理虚拟化申请模态框（Modal） -->
<div class="modal inmodal" id="addInfoModal" tabindex="-1" role="dialog" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content animated fadeIn">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h3 class="control-label col-sm-3 col-lg-3" id="addModalLabel">
                    申请资源
                </h3>
            </div>
            <form class="form-horizontal" id="jquery_post_from" method="post" action={% url 'vmapply' %}>
                <div class="modal-body" style="margin-top: 15px">
                    <input type="hidden" name="csrfmiddlewaretoken"
                           value="kRaVIjNCyIT8a9V7EzT7ffeSH3avSyg7">
                    <div class="form-group">
                       <label class="col-sm-3 col-lg-3 control-label">{{ form.vm_ower.label }}</label>
                        <div class="col-sm-8 col-lg-8">{{ form.vm_ower }}</div>
                   </div>

                    <div class="form-group">
                       <label class="col-sm-3 col-lg-3 control-label">{{ form.vm_system.label }}</label>
                        <div class="col-sm-8 col-lg-8">{{ form.vm_system }}</div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-3 col-lg-3 control-label">{{ form.vm_bit.label }}</label>
                        <div class="col-sm-8 col-lg-8">{{ form.vm_bit }}
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-3 col-lg-3 control-label">{{ form.vm_cpu.label }}</label>
                        <div class="col-sm-8 col-lg-8">{{ form.vm_cpu }}</div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-3 col-lg-3 control-label">{{ form.vm_mem.label }}</label>
                        <div class="col-sm-8 col-lg-8">{{ form.vm_mem }}</div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-3 col-lg-3 control-label">{{ form.vm_disk.label }}</label>
                        <div class="col-sm-8 col-lg-8">{{ form.vm_disk }}</div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-3 col-lg-3 control-label">{{ form.vm_use.label }}</label>
                        <div class="col-sm-8 col-lg-8">{{ form.vm_use }}</div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-3 col-lg-3 control-label">{{ form.vm_stime.label }}</label>
                        <div id="system_user" class="col-sm-8 col-lg-8">{{ form.vm_stime }}</div>
                    </div>

                     <div class="form-group">
                        <label class="col-sm-3 col-lg-3 control-label">{{ form.vm_endtime.label }}</label>
                        <div class="col-sm-8 col-lg-8">{{ form.vm_endtime }}</div>
                    </div>

                      <div class="form-group">
                        <label class="col-sm-3 col-lg-3 control-label">{{ form.vm_beizhu.label }}</label>
                        <div class="col-sm-8 col-lg-8">{{ form.vm_beizhu }}</div>
                    </div>


                    <div style="text-align:center">
                        <!--<button id="reset" class="btn btn-white" type="cancel"> 重置</button>-->
                        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                        <button type="submit" class="btn btn-primary"> 申请</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>


<!-- 处理虚拟机申请模态框（Modal） -->
    <div class="modal inmodal" id="editInfoModal" tabindex="-1" role="dialog" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content animated fadeIn">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                        &times;
                    </button>
                    <h3 class="control-label col-sm-3 col-lg-3" id="editModalLabel">
                        虚拟资源申请
                    </h3>
                </div>
                <div class="modal-body" style="margin-top: 15px">
                    <form class="form-horizontal" id="jquery_post_from1" method="post" action={% url 'server_edit' %}>
                     <div class="modal-body" style="margin-top: 15px">
                          <input type="hidden" name="csrfmiddlewaretoken"
                           value="kRaVIjNCyIT8a9V7EzT7ffeSH3avSyg7">
                        <div class="form-group">
                            <label class="col-sm-3 col-lg-3 control-label">{{ form.vm_ip.label }}</label>
                            <div class="col-sm-8 col-lg-8">
                                <input class="form-control" id="vm_ip" name="vm_ip" maxlength="100" type="text" value={{ i.vm_ip }}>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 col-lg-3 control-label">{{ form.vm_hostname.label }}</label>
                            <div class="col-sm-8 col-lg-8">
                                <input class="form-control" id="vm_hostname" name="vm_hostname" maxlength="100" type="text" value={{ i.vm_hostname }}>
                            </div>
                        </div>


                        <div class="form-group">
                            <label class="col-sm-3 col-lg-3 control-label">{{ form.vm_system.label }}</label>
                            <div class="col-sm-8 col-lg-8">
                                <select id="edit_vm_system" name="edit_vm_system" class="form-control">
                                </select>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 col-lg-3 control-label">{{ form.vm_cpu.label }}</label>
                            <div class="col-sm-8 col-lg-8">
                                <select id="edit_vm_cpu" name="edit_vm_cpu" class="form-control">
                                </select>
                            </div>
                        </div>

                          <div class="form-group">
                            <label class="col-sm-3 col-lg-3 control-label">{{ form.vm_mem.label }}</label>
                            <div class="col-sm-8 col-lg-8">
                                <select id="edit_vm_mem" name="edit_vm_mem" class="form-control">
                                </select>
                            </div>
                        </div>


                        <div class="form-group">
                            <label class="col-sm-3 col-lg-3 control-label">{{ form.vm_disk.label }}</label>
                            <div class="col-sm-8 col-lg-8">
                                 <input class="form-control" id="vm_disk" name="vm_disk" maxlength="100" type="text" value={{ i.vm_disk }}>
                                </select>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 col-lg-3 control-label">{{ form.vm_status.label }}</label>
                            <div class="col-sm-8 col-lg-8">
                                <select id="edit_vm_status" name="edit_vm_status" class="form-control">
                                </select>
                            </div>
                        </div>
                       <div class="form-group">
                            <label class="col-sm-3 col-lg-3 control-label">{{ form.vm_beizhu.label }}</label>
                            <div class="col-sm-8 col-lg-8">
                                <input class="form-control" id="vm_beizhu" name="vm_beizhu" maxlength="100" type="text" value={{ i.vm_beizhu }}>
                            </div>
                        </div>
                    </form>
                    <div style="text-align:center">
                        <!--<button id="reset2" class="btn btn-white" type="cancel"> 重置</button>-->
                        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                        <button id="editSave" class="btn btn-primary"> 提交</button>
                    </div>
                </div>
            </div>
        </div>
    </div>